function readonly(){
  $(":submit").attr("disabled","disabled");
}
function remove_readonly(){
  $(":submit").removeAttr("disabled","disabled");
}
function before_submit() {
	window.scrollTo(100,0);
  readonly();
  $("#div-result").fadeOut(2);
  $("#div-result").fadeIn();
  $("#div-result").html('');
  $("#div-result").addClass("load");
}
function error_submit(error) {
	remove_readonly();
  $("#div-result").removeClass("load");
  $("#div-result").attr("class","alert alert-error");
  $("#div-result").html(error);
}
function success_submit(success,refresh) {
	if(refresh!='') {
		window.location.href = baseUrl + refresh;
	}
	else {
		remove_readonly();
	}
	$("#div-result").attr("class","alert alert-success");
  $("#div-result").html(success);
}